<?php
/**
 * Aero - Xistins Technologies PHP Framework
 * 
 * LICENSE
 * This source file is subject to the New BSD license that is bundled 
 * with this package in the LICENSE.txt. It is also available through 
 * the world-wide-web at this URL: http://dev.xistins.com/license/production
 * If you did not receive a copy of this license and are unable to obtain
 * it through the world-wide-web, please send an email to 
 * license@xistins.com so we can send you a copy immediately.
 * 
 * @category   Aero
 * @package    Aero_View
 * @subpackage Helper
 * @copyright  http://dev.xistins.com/license/production     New BSD
 * @version    $Id: HeadTitle.php 2 2009-11-03 04:10:03Z csouth@xistins.com $
 */

/** @see Aero_View_Helper **/
require_once 'Aero/View/Helper.php';

/**
 * View helper for title tags
 * 
 * @category   Aero
 * @package    Aero_View
 * @subpackage Helper
 * @copyright  http://dev.xistins.com/license/production     New BSD
 * @version    $Id: HeadTitle.php 2 2009-11-03 04:10:03Z csouth@xistins.com $
 */
class Aero_View_Helper_HeadTitle extends Aero_View_Helper
{
    /**
     * HTML Title
     * @var string
     */
    protected $_title;

    /**
     * HTML title tags
     * 
     * @param  string $title
     * @return Aero_View_Helper_HeadTitle
     */
    public function headTitle($title = null)
    {
        if($title) {
            $this->_title = $title;
        }

        return $this;
    }

    /**
     * Return Title Tags
     * 
     * @return string
     */
    public function __toString()
    {
        return $this->_indent . '<title>' . $this->_title . "</title>\n";
    }
}